Learn R Programming

simPop (version 0.3.0)

addWeights<-: Methods for function addWeights

Description

allows to modify sampling weights of an dataObj or simPopObj-object. As input the output of calibSample must be used.

Usage

addWeights(object) <- value
"addWeights"(object) <- value
"addWeights"(object) <- value

Arguments

object
an object of class dataObj or simPopObj.
value
a numeric vector of suitable length

Examples

Run this code
data(eusilcS)
data(totalsRG)
inp <- specifyInput(data=eusilcS, hhid="db030", hhsize="hsize", strata="db040", weight="db090")
## Not run: 
# ## approx. 20 seconds ...
# addWeights(inp) <- calibSample(inp, totalsRG)
# ## End(Not run)

Run the code above in your browser using DataLab